<template>
  <div id="productStatus">
    <el-row v-for="work in workshopData" :key="work.id">
      <div class="title">
        {{work.title}}
      </div>
      <el-col :span="8" v-for="item in work.list" :key="item.id">
        <el-card class="box-card">
          <div slot="header" class="clearfix">
            <span>{{item.name}}</span>
          </div>
          <div class="cha-wrapper">
            <v-chart :options="item.chaOpt" />
          </div>
        </el-card>
      </el-col>
    </el-row>
  </div>
</template>

<script>
import { workshopData } from '@/assets/js/mock'

import ECharts from 'vue-echarts'
import 'echarts/lib/chart/pie'
import 'echarts/lib/chart/line'
import 'echarts/lib/chart/bar'
import 'echarts/lib/component/legend'
export default {
  name:'productStatus',
  components: {
    'v-chart': ECharts
  },
  data () {
    return {
      workshopData
      
    }
  },
  methods: {
    
  },
  created() {
    
  }

}
</script>

<style lang="less">
#productStatus {
  .title {
    text-align: center;
  }
  .cha-wrapper {
    width: 400px;
    height: 400px;
  }
  .echarts {
    width: 100%;
    height: 100%;
  }
  .el-row {
    margin-bottom: 20px;
  }
  .title {
    padding-bottom: 10px;
  }
  .box-card {
    margin-right: 20px;
  }
}
</style>